package com.workplan.client.widgets.addshifts;

import net.customware.gwt.presenter.client.EventBus;
import net.customware.gwt.presenter.client.widget.WidgetPresenter;

import com.general.client.action.ActionHandler;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.Window;

public class AddShiftsPresenterImpl extends
		WidgetPresenter<AddShiftsPresenter.Display> implements
		AddShiftsPresenter {

	public AddShiftsPresenterImpl(Display display, EventBus eventBus) {
		super(display, eventBus);
	}

	@Override
	protected void onBind() {
		// TODO real handler to fire event of adding shifts
		display.addAddActionHandler(new ActionHandler() {

			@Override
			public <H extends EventHandler> void onAction(GwtEvent<H> event) {
				Window.alert("shifts added");
				display.setDefaultValues();
			}
		});
	}

	@Override
	protected void onUnbind() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void onRevealDisplay() {
		// TODO Auto-generated method stub

	}

}
